package com.wind;

import java.util.ArrayList;
import java.util.List;

public class WindQuery {

	private WindType type = null;
	
	private List<String> sort = new ArrayList<String>();
	
	private List<WindQueryFilter> filters = new ArrayList<WindQueryFilter>();
	
	public WindQuery(WindType type) {
		this.type = type;
	}
	
	public WindType getType() {
		return this.type;
	}
	
	public void addSort(String sort) {
		this.sort.add(sort);
	}
	
	public String[] sort() {
		return (String[])this.sort.toArray();
	}
	
	public WindQueryFilter[] filters() {
		return (WindQueryFilter[])this.filters.toArray();
	}
	
	public void addFilter(String name, String operator, String value) {
		WindQueryFilter filter = new WindQueryFilter(name, operator, value);
		this.filters.add(filter);
	}
}
